<template>
	<div class="q-error-title">
		<div class="q-style-type">【听力题】</div>
		<ve-audio :src="parsePath" />
		<ve-parse class="q-style-text" :article="questionTitle" />
	</div>
</template>

<script>
	export default {
		props: {
			// 题干
			questionTitle: {
				type: String,
				default: ""
			},
			// 听力文件地址
			listeningAudioUrl: {
				type: String,
				default: ""
			}
		},
		computed: {
			parsePath() {
				return /^https?:\/\//.test(this.listeningAudioUrl) ? this.listeningAudioUrl : UrlUtil.getViewUrl(this.listeningAudioUrl);
			}
		}
	};
</script>
